package com.tutu.config;


import com.tutu.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

/**
 * java配置类
 */
@Configuration
public class JavaConfig {

    @Bean
    @Lazy  //延迟加载，只使用的时候才会创建
    public User user() {
        return new User();
    }

    @Bean
    public MyBeanFactoryPostProcessor myBeanFactoryPostProcessor() {
        return new MyBeanFactoryPostProcessor();
    }
}
